
pkgname=shared-mime-info
pkgver=1.9
pkgrel=1
pkgdesc="Freedesktop.org Shared MIME Info"
arch=('x86_64')
url="https://freedesktop.org/Software/shared-mime-info"
license=('GPL')
depends=('libxml2' 'glib2')
makedepends=('intltool' 'pkgconfig')
options=('!makeflags')
source=("https://freedesktop.org/~hadess/${pkgname}-${pkgver}.tar.xz"
        'update-mime-database.hook')
md5sums=('45103889b91242850aa47f09325e798b'
         'fc48155d8fb2147b8fc72597e79936b4')

build() {
  cd ${pkgname}-${pkgver}
  # stop pacman datasync after each package
  export ac_cv_func_fdatasync=no
  
  ./configure --prefix=/usr --disable-update-mimedb
  make
}

check() {
  cd ${pkgname}-${pkgver}
  
  make -k check
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
  
  install -Dm644 ../update-mime-database.hook ${pkgdir}/usr/share/libalpm/hooks/update-mime-database.hook
}
